<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        for (var i = 1; i <= 10; i++) {}
        console.log(i); //自增到10停止自增+前面的i=1
        for (var i = 1; i < 7; i = i + 3) {
            //i+3=6小于7输出
        }
        console.log(i); //输出6+前面的i=1
    </script>
</body>

</html>